package com.itheima.demo2;

public interface Eatable1 {
    void eat(String food);
}


class TestEatable{
    public static void main(String[] args) {
        useEatable(new Eatable() {
            @Override
            public void eat(String food) {
                System.out.println("我们吃"+food);
            }
        });
        useEatable(food -> System.out.println("我们吃"+food));
    }

    public static void useEatable(Eatable eatable){
        eatable.eat("123");
    }
}

